<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
 <script type="text/javascript" src="${pageContext.request.contextPath}/sys/style/js/jquery.js"></script>    
<script type="text/javascript" src="${pageContext.request.contextPath}/sys/style/js/jquery.min.js"></script> 
  

  </head>
  
  <body>
  <div id="asd"></div>
    <form action="/OrderSystem/OrderCartAction_pay.action" method="post">
    	<select name="select_vid" id="iddd">
    	</select>
    	<input type="submit" value="结算" />
    </form>
    
    
<script type="text/javascript">
$.ajax
	(
			{
					async:false,
				
			        type:"POST",
			        
			        url:"/OrderSystem/OrderCartAction_select_vip_id.action",
			
			        cache : false, 
			          
			        success:function(data)
			        {	 
			        	var obj 	= jQuery.parseJSON(data);
			        	console.log(obj);
			        	 $("#iddd").append
		        		(
		        				"<option value=1>"+
		        				"无vip"+
		        				"</option>"
		        		);  
			        	
			        	for(var i =0;i<obj.length;i++)
			        	{
			        		$("#iddd").append
			        		(
			        				"<option value="+
			        				+obj[i].v_id+">"
			        				+obj[i].v_name+
			        				"</option>"
			        		); 
			        	} 
			        },
			        
			        error: function()
			        {   
			        	toastr.error('获取餐桌id的下拉框失败');
			        }         
			}
	);

</script>
  </body>
</html>
